1. Field of the Invention
The invention relates to a method of compressing a digital image signal, especially a video signal, and to a device for implementing this method.
More specifically, the invention relates to the compression, by devices which convert analog video signals into digital signals and encode them by transformation into a frequency domain, in particular in order to store the corresponding information on magnetic media. These are, for example, devices called VTRs or Video Tape Recorders.
2. Description of the Related Art
An image is generally recorded on a medium in the form of a collection of data associated with points of the image called pixels. In order to do this, the image is broken down into matrices of pixels. For example, in the red-green-blue color system, one matrix of pixels is associated with each of these three color components. These three components are frequently replaced by one luminance component combined with two chrominance components.
A video signal consists of a series of such images.
Methods for compressing a digital video signal are already known from the prior art, comprising:                dividing matrices of pixels into blocks of N×M pixels (N and M being non-zero integers), that is to say N×M points of a spatial domain; this results in spatial blocks of N by M coefficients for each component;        grouping several spatial blocks into one macroblock; in a common embodiment, one macroblock integrates a number of luminance blocks and one or two chrominance blocks, the spatial resolution of the luminance pixels usually being finer than that of the chrominance pixels;        assembling several macroblocks into one segment;        transforming, in the frequency domain, N×M coefficients of each spatial block, in order to obtain a frequency block, called a DCT block;        a step of quantizing the coefficients thus obtained inside each segment; and        a step of conservative compression of the quantized coefficients.        
In the same way that there is a one-to-one correspondence between a spatial block and a frequency block, it is possible to associate a macroblock of frequency blocks with a macroblock of spatial blocks, and a segment in the frequency domain with a segment in the spatial domain. Subsequently, it will be equally possible to use the same term “macroblock” (“segment”) to denote a macroblock (segment) in the spatial domain or a macroblock (segment) in the frequency domain.
In the methods mentioned above, one macroblock consists, for example, of four DCT luminance blocks and of two or four DCT chrominance blocks. One segment, for example, consists of five macroblocks. One segment must be encoded by a number of bits corresponding to a target value, so that it is possible to control the output bit rate of the compression device.
The quantization consists in dividing the coefficients of the DCT blocks by a quantization step and in rounding-off the value thus obtained to the closest integer. This quantization step is chosen according to the quality desired for the image restored after compression and storage. The greater the step, the greater the loss of information introduced to each coefficient.
Each DCT block is generally quantized using a quantization step set. Thus, for example, in the standard defined by “Specifications of Consumer-Use Digital VCRs” (HD Digital VCR Conference, December 1994), a quantization step set comprises four quantization steps, each one being applied to a different portion of the same block.
U.S. Pat. No. 5,677,734 describes a method for compressing video signals in which the macroblocks of one segment are subject to a first quantization producing, after Huffman encoding, an amount of data less than a target value, then the fineness of quantization of some of the macroblocks is increased by ensuring that the amount of data for the segment does not exceed the target value. The macroblocks which are quantized more finely are chosen according to their location with respect to the center of the image.